/*
 * @Author: scl
 * @Date: 2023-07-06 10:26:00
 * @LastEditTime: 2023-07-08 08:39:19
 * @Description: file content
 */
/* interface routeFormat{
    name:string,
    path:string,
    component:()=>{},
}
 */
 
const staticRoute=[
    {
        name:'hello',
        path:'/hello',
        component:()=>import('../components/HelloWorld.vue')
    } ,
    {
        name:'/login',
        path:'/login',
        component:()=>import('@/views/login.vue'),
        meta:{
            title:'登录',//菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
        }
    },
    {
        //登录成功以后展示数据的路由
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
          title: '',
          hidden: false,
          icon: '',
        },
        redirect: '/home',
        children: [
          {
            path: '/home',
            component: () => import('@/views/home.vue'),
            meta: {
              title: '首页',
              hidden: false,
              icon: 'HomeFilled',
            },
          },
        ],
      },
    {
        name:'404',
        path:'/404',
        component:()=>import('@/views/notFound.vue')
    },
    /* {
        path:'/:pathMatch(.*)',
        component:()=>import('@/views/notFound.vue')
    } */
]

const asyncRoute=[{

}]

const anyRoute = {
    //任意路由
    path: '/:pathMatch(.*)',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'DataLine',
    },
  }
  
export {staticRoute,asyncRoute,anyRoute}